package com.roncoo.education.course.service.api.pc.biz;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.roncoo.education.course.common.dto.*;
import com.roncoo.education.course.common.req.AnswerREQ;
import com.roncoo.education.course.common.req.TopicHistoryREQ;
import com.roncoo.education.course.service.dao.service.impl.mapper.TopicAnswerMapper;
import com.roncoo.education.course.service.dao.service.impl.mapper.TopicHistoryMapper;
import com.roncoo.education.course.service.dao.service.impl.mapper.TopicMapper;
import com.roncoo.education.util.base.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;


/**
 * 试卷题目
 */
@Component
public class PcApiTopIcHistoryBiz {

    @Resource
    private TopicHistoryMapper historyMapper;

    public Result<Page> findPageList(TopicHistoryREQ recordsREQ){
        Page<TopicHistoryDto> page =new Page<>(recordsREQ.getPageCurrent(),recordsREQ.getPageSize());
        List<TopicHistoryDto> list=historyMapper.findPageList(recordsREQ,page);

        return Result.success(page.setRecords(list));
    }


}
